//
//  LayoutOfFirst.m
//  UI23_UICollectionView
//
//  Created by Scott on 16/3/30.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "LayoutOfFirst.h"



@implementation LayoutOfFirst

- (instancetype)init {
    
    self = [super init];
    if (self) {
        
        NSLog(@"%s", __FUNCTION__);
        
        // item size
        self.itemSize = CGSizeMake((SCREEN_WIDTH - 80) / 3.0 , ((SCREEN_WIDTH - 80) / 3.0) * 1.618);
        
        // item之间最小间距(横向)
        self.minimumInteritemSpacing = 20;
        
        // 纵向最小间距
        self.minimumLineSpacing = 20;
        
        // 滑动方向
        //    self.flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
        
        // 分区边缘距离
        self.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20);
        
        // 设置分区的头部和尾部视图大小.
        self.headerReferenceSize = CGSizeMake(50, 100);
        
        self.footerReferenceSize = CGSizeMake(100, 50);
       
    }
    
    return self;
}

- (void)prepareLayout {
    [super prepareLayout];
    
    NSLog(@"%s", __FUNCTION__);
    
}



@end
